//
//  AssetStatesCell.m
//  CJRailTransport
//
//  Created by Hank on 2017/11/30.
//  Copyright © 2017年 amplity. All rights reserved.
//

#import "AssetStatesCell.h"

@implementation AssetStatesCell

// 设置数据
- (void)setData:(DetailInfoModel *)detailInfoModel target:(NSString *)target
{
    if ([target isEqualToString:@"2"]) {
        self.containerNumberTitle.text = @"集装箱编号";
    }else if ([target isEqualToString:@"3"]){
        self.containerNumberTitle.text = @"支架编号";
    }
    
    // 设置集装箱编号
    self.containerNumber.text = detailInfoModel.vin;
    // 设置生产/租赁批次
    self.production.text = detailInfoModel.useTime;
    // 设置来源
    self.source.text = detailInfoModel.providerName;
    // 设置剩余租期
    self.tenancyTerm.text = detailInfoModel.time;
    // 设置租金/采购价
    self.rental.text = detailInfoModel.cost;
    // 设置当前状态
    self.currentState.text = detailInfoModel.statusName;
    // 设置位置
    self.location.text = detailInfoModel.position;
    // 设置在途时长
    self.inTransitTime.text = detailInfoModel.transitTime;
    // 设置储存时长
    self.storageTime.text = detailInfoModel.saveTime;
    // 设置累计使用次数
    self.cumulativeNumber.text = detailInfoModel.useCount;
    // 质损情况
//    if (JudgeStrEqualNull(detailInfoModel.remark)) {
//        self.damaged.hidden = NO;
//        self.damagedBtn.hidden = YES;
//    }else{
        self.damagedBtn.hidden = NO;
        self.damaged.hidden = YES;
//    }
}

//  去除分割线
- (UIView *)lineView
{
    return [[UIView alloc]init];
}
// 损坏情况
- (IBAction)damagedConditionAction:(UIButton *)sender
{
    // 损坏情况 Block
    _damagedConditionBlock();
}

@end
